1. Field of the Invention
Embodiments of the invention relate generally to information processing systems. More specifically, embodiments of the invention provide an improved system and method for protecting large objects within an advanced synchronization facility.
2. Description of the Related Art
Shared-memory computer systems allow multiple concurrent threads of execution to access shared memory locations. Unfortunately, writing correct multi-threaded programs is difficult due to the complexities of coordinating concurrent memory access. One approach to concurrency control between multiple threads of execution is transactional memory. In a transactional memory programming model, a programmer may designate a section of code (i.e., an execution path or a set of program instructions) as a “transaction,” which a transactional memory system should execute atomically with respect to other threads of execution. For example, if the transaction includes two memory store operations, then the transactional memory system ensures that all other threads may only observe either the cumulative effects of both memory operations or of neither, but not the effects of only one.
To implement transactional memory, memory accesses are sometimes executed one by one speculatively and committed all at once at the end of the transaction. Otherwise, if an abort condition is detected (e.g., data conflict with another processor), those memory operations that have been executed speculatively may be rolled back or dropped and the transaction may be reattempted. Data from speculative memory accesses may be saved in a speculative data buffer, which may be implemented by various hardware structures, such as an on-chip data cache.
Various transactional memory systems have been proposed, including those implemented by software, by hardware, or by a combination thereof. However, many traditional implementations are bound by various limitations. For example, hardware-based transactional memory proposals (HTMs) sometimes impose limitations on the size of transactions supported (i.e., maximum number of speculative memory operations that can be executed before the transaction is committed). Often, this may be a product of limited hardware resources, such as the size of one or more speculative data buffers used to buffer speculative data during transactional execution.
One example of a transactional memory system is the Advanced Synchronization Facility (ASF) proposed by Advanced Micro Devices (AMD). The ASF allows user and system level code to modify a set of memory objects atomically without requiring expensive synchronization mechanisms. One issue that is present in transactional memory systems such as the ASF relates to enabling tracking of large read sets without requiring large amounts of hardware resources. For example within certain cache based transactional memory systems it is possible that cache conflicts can cause the system to pessimistically promote speculative information to the entire index of a cache on eviction of tracked data. Such an operation can potentially cause false positives as every certain number of cache lines can cause a conflict with the index.